﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WSAP
{
    /// <summary>
    /// 矩形板有限元分析测试
    /// </summary>
    public partial class RecSlabTestForm : Form
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public RecSlabTestForm()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 板宽
        /// </summary>
        public double width
        {
            get
            {
                return Convert.ToDouble(this.SlabWidthTextbox.Text);
            }
        }

        /// <summary>
        /// 板长
        /// </summary>
        public double length
        {
            get
            {
                return Convert.ToDouble(this.SlabLengthTextbox.Text);
            }
        }

        /// <summary>
        /// 板厚
        /// </summary>
        public double thickness
        {
            get
            {
                return Convert.ToDouble(this.SlabThickTextbox.Text);
            }
        }

        /// <summary>
        /// 剖分尺度
        /// </summary>
        public double mesh
        {
            get
            {
                return Convert.ToDouble(this.MeshTextbox.Text);
            }
        }

        /// <summary>
        /// 节点荷载
        /// </summary>
        public double load
        {
            get
            {
                return Convert.ToDouble(this.LoadTextbox.Text);
            }
        }

        /// <summary>
        /// 板有限元分析
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AnalyzeButton_Click(object sender, EventArgs e)
        {
            if(this.FixRadioButton.Checked) WSAPRecSlab.FixExample(this.width, this.length, this.thickness, this.load, this.mesh);
            else WSAPRecSlab.PinExample(this.width, this.length, this.thickness, this.load, this.mesh);
        }
    }
}
